const { log } = require('console');
var fs=require('fs');
//异步读取
fs.readFile('./流式写入.txt',(err,data)=>{
    if(err)
    {
        console.log('出错了');
        return;
    }
    else
    {
        console.log(data.toString());
    }
});
//同步读取
let data=fs.readFileSync('./流式写入.txt')
{
    console.log(data.toString());
}